import axios from '@/libs/api.request'

export const login = ({userName, password, verify}) => {
    const data = {
        userName,
        password,
        verify
    }
    return axios.request({
        url: 'token/user?type=web',
        data,
        method: 'post'
    })
}
export const password = (data) => {
    return axios.request({
        url: 'user/password',
        data,
        method: 'post'
    })
}

export const getUserInfo = () => {
    return axios.request({
        url: 'user/info',
        method: 'get'
    })
}

export const logout = () => {
    return axios.request({
        url: 'token/remove',
        method: 'post'
    })
}
